package j2metris;

import j2metris.pieces.PieceManager;
import javax.microedition.lcdui.Image;

public class GlobalSettings implements Settings
{
    private PieceManager pieceList = new PieceManager();
    public void setPieceList(PieceManager setter)
    {
        pieceList = setter;
    }
    public PieceManager getPieceList()
    {
        return pieceList;
    }

    private int unitWidth = 13;
    public int getUnitWidth()
    {
        return unitWidth;
    }
    public void setUnitWidth(int widthSetter)
    {
        unitWidth = widthSetter;
    }
    private int unitHeight = 13;
    public int getUnitHeight()
    {
        return unitHeight;
    }
    public void setUnitHeight(int heightSetter)
    {
        unitHeight = heightSetter;
    }

    private int delayInMilliseconds = 1000;
    public int getDelayInMilliseconds()
    {
        return delayInMilliseconds;
    }
    public void setDelayInMilliseconds(int delaySetter)
    {
        delayInMilliseconds = delaySetter;
    }

    private PieceGenerator pieceGenerator = new PieceGenerator();
    public PieceGenerator getPieceGenerator()
    {
        return pieceGenerator;
    }
    public void setPieceGenerator(PieceGenerator generatorSetter)
    {
        pieceGenerator = generatorSetter;
    }

    private int wellWidth = 10;
    public int getWellWidth()
    {
        return wellWidth;
    }
    public void setWellWidth(int widthSetter)
    {
        wellWidth = widthSetter;
    }

    private int wellHeight = 22;
    public int getWellHeight()
    {
        return wellHeight;
    }
    public void setWellHeight(int heightSetter)
    {
        wellWidth = heightSetter;
    }

    private final int[] bgArbg = new int[unitWidth * unitHeight];
    {
        for(int i = 0; i < bgArbg.length; ++i)
        {
            bgArbg[i] = 0xFF000000;
        }
    }
    private Image backgroundImage = Image.createRGBImage(
            bgArbg,
            unitWidth,
            unitHeight,
            false);
    public Image getBackgroundImage()
    {
        return Image.createImage(backgroundImage);
    }
    public void setBackgroundImage(Image bgImage)
    {
        backgroundImage = Image.createImage(bgImage);
    }

    private int initialMovementDelay = 300;
    public int getInitialMovementDelay()
    {
        return initialMovementDelay;
    }
    public void setInitialMovementDelay(int delayParam)
    {
        initialMovementDelay = delayParam;
    }

    private int mainMovementDelay = 100;
    public int getMainMovementDelay()
    {
        return mainMovementDelay;
    }
    public void setMainMovementDelay(int delayParam)
    {
        mainMovementDelay = delayParam;
    }

    private int initialRotationDelay = 300;
    public int getInitialRotationDelay()
    {
        return initialRotationDelay;
    }
    public void setInitialRotationDelay(int delayParam)
    {
        initialRotationDelay = delayParam;
    }

    private int mainRotationDelay = 100;
    public int getMainRotationDelay()
    {
        return mainRotationDelay;
    }
    public void setMainRotationDelay(int delayParam)
    {
        mainRotationDelay = delayParam;
    }

}
